<div class="page_wrap section_inner clearfix">
    <div class="page_nav">
        <ul>
        <?php
			$count = 0;
			foreach ($cms_categories as $cms_category)
			{
				$count ++;
		?>
            <li>
                <a href="<? echo url_for('plans/permalink?cms_category_id='.$cms_category['cms_category_id'].'')?>" class="<?php echo ($count == 1)?"first active":"" ?> w4l_internal_link"><?php echo $cms_category['name']; ?></a>
            </li>
        <?php
			}
		?>
        </ul>
      	<a href="<?php echo url_for("cooperations");?>" class="button button_special cta w4l_internal_link">
      		<i></i>
      		<span class="button_label">Hợp tác &amp; Bảng giá</span>
      		<b></b>
    	</a>
        <a href="<?php echo url_for("contact"); ?>" class="button cta w4l_internal_link">
          	<i></i>
          	<span class="button_label">Liên hệ</span>
          	<b></b>
        </a>
    </div>
    <div class="page_container page_two_columns">
        <div class="page_header clearfix">
            <h1>Dự án</h1>
        </div>
        <div class="page_content">
        	<?
			$count = 0;
			if (!isset($cms_list) || count($cms_list) == 0)
			{
				echo "<div style='padding-left:40px;'>Thông tin đang được cập nhật. Quý khách vui lòng vào lại sau.</div>";
			}
			else
			{
				foreach ($cms_list as $cms_obj)
				{
					$count ++;
					if (count($cms_list) == 1)
					{
						include("cms_view.php");
					}
					else 
					{
					?>
                        <div class="page_section case_study <?=($count % 2 == 0)?"last":""?>">
                            <div class="case_study_thumbnail">
                                <div class="case_study_thumbnail_inner">
                                    <a href="/uploads/cms/<?=$cms_obj['picture']?>" rel='example_group'>
                                        <img src="/uploads/cms/thm_<?=$cms_obj['picture']?>" alt="<?=$cms_obj['name']?>">
                                    </a>
                                </div>
                            </div>
                            <div class="case_study_intro">
                                <p><?=$cms_obj['description']?></p>
                            </div>
                            <p class="action">
                                <a class="read w4l_internal_link" href="<? echo url_for('plans/permalink?cms_category_id='.$cms_category['cms_category_id'].'&cms_id='.$cms_obj['cms_id'])?>">Chi tiết</a>
                                <?
                                // <a class="download w4l_internal_link" href="">Link</a>
                                ?>
                            </p>
                        </div>
					<?
					}
				}
			}
			?>
        </div>
    </div>
</div>